from flask import render_template, session, redirect, url_for
from . import web_bp

# 首页
@web_bp.route('/')
def index():
    if 'user_id' not in session:
        return redirect(url_for('web.login'))
    return render_template('index.html')